/// GiftCardTypeDto
class GiftCardTypeDto {
  /// 卡种类ID
  final int? cardTypeId;
  /// 卡种类名称
  final String typeName;
  /// 图片地址
  final String? iconUrl;

  GiftCardTypeDto({
    this.cardTypeId,
    required this.typeName,
    this.iconUrl,
  });

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    if (cardTypeId != null) data['cardTypeId'] = cardTypeId;
    data['typeName'] = typeName;
    if (iconUrl != null) data['iconUrl'] = iconUrl;
    return data;
  }

  factory GiftCardTypeDto.fromJson(Map<String, dynamic> json) {
    return GiftCardTypeDto(
      cardTypeId: json['cardTypeId'],
      typeName: json['typeName'],
      iconUrl: json['iconUrl'],
    );
  }
}